package com.xufx.algorithm.recursion;

public class ArrayRecursion {
    public static void main(String[] args) {
        int[] arr = new int[]{1,2,3,4,5};
        traverse(arr,0);
    }

    private static void traverse(int[] arr, int index) {
        int len = arr.length;
        if(index == len){
            return;
        }
        System.out.println(arr[index]);
        index += 1;
        traverse(arr, index);
    }
}
